package csu.ssd.student;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.control.Button;
import javafx.scene.layout.AnchorPane;

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;

public class mainController implements Initializable {
    @FXML
    private AnchorPane parent;

    @FXML
    private Button dan;

    @FXML
    private Button yuan;

    @FXML
    private Button tong;

    @FXML
    private Button bang;

    @FXML
    private Button cha;

    @FXML
    private Button wai;

    @FXML
    void cha(ActionEvent event) throws IOException {
        Parent checkjiemian = FXMLLoader.load(this.getClass().getResource("cha.fxml"));
        parent.getChildren().clear();
        parent.getChildren().add(checkjiemian);

    }

    @FXML
    void yuan(ActionEvent event) throws IOException {
        Parent checkjiemian = FXMLLoader.load(this.getClass().getResource("yuan.fxml"));
        parent.getChildren().clear();
        parent.getChildren().add(checkjiemian);

    }

    @FXML
    void tong(ActionEvent event) throws IOException {
        Parent checkjiemian = FXMLLoader.load(this.getClass().getResource("tong.fxml"));
        parent.getChildren().clear();
        parent.getChildren().add(checkjiemian);

    }

    @FXML
    void dan(ActionEvent event) throws IOException {
        Parent checkjiemian = FXMLLoader.load(this.getClass().getResource("dan.fxml"));
        parent.getChildren().clear();
        parent.getChildren().add(checkjiemian);

    }

    @FXML
    void wai(ActionEvent event) throws IOException {
        Parent checkjiemian = FXMLLoader.load(this.getClass().getResource("wai.fxml"));
        parent.getChildren().clear();
        parent.getChildren().add(checkjiemian);

    }

    @FXML
    void bang(ActionEvent event) throws IOException {
        Parent checkjiemian = FXMLLoader.load(this.getClass().getResource("bang.fxml"));
        parent.getChildren().clear();
        parent.getChildren().add(checkjiemian);

    }

    @Override
    public void initialize(URL location, ResourceBundle resources) {

    }
}
